ScCompiler.bufferIsHlslCounterBuffer

HLSL counter buffer reflection interface. Append/Consume/Increment/Decrement in HLSL is implemented as two "neighbor" buffer objects where one buffer implements the storage, and a single buffer containing just a lone "int" implements the counter. To SPIR-V these will be exposed as two separate buffers, but glslang HLSL frontend emits a special indentifier which lets us link the two buffers together.

Queries if a variable ID is a counter buffer which "belongs" to a regular buffer object.

If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module. Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will only return true if OpSource was reported HLSL. To rely on this functionality, ensure that the SPIR-V module is not stripped.

class ScCompiler
const
bool
bufferIsHlslCounterBuffer
(
uint id
)

Meta